package com.usian.common.interceptor;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Component
public class WebMvcConfigScan implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        ///emp/**为拦截的url路径
        registry.addInterceptor(new ArticleInterceptor()).addPathPatterns("/emp/**");
    }

}
